<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="google-site-verification" content="xBT4GhYoi5qRD5tr338pgPM5OWHHIDR6mNg1a3euekI" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="智红的博客">
    <meta name="keyword"  content="智红">
    <link rel="shortcut icon" href="/img/favicon.ico">

    <title>
        
        manjaro安装后需要做的事情 - 智红的博客
        
    </title>

    <!-- Custom CSS -->
    
<link rel="stylesheet" href="/css/aircloud.css">

    
<link rel="stylesheet" href="/css/gitment.css">

    <!--<link rel="stylesheet" href="https://imsun.github.io/gitment/style/default.css">-->
    <link href="//at.alicdn.com/t/font_620856_pl6z7sid89qkt9.css" rel="stylesheet" type="text/css">
    <!-- ga & ba script hoook -->
    <script></script>
<meta name="generator" content="Hexo 5.3.0"></head>

<body>

<div class="site-nav-toggle" id="site-nav-toggle">
    <button>
        <span class="btn-bar"></span>
        <span class="btn-bar"></span>
        <span class="btn-bar"></span>
    </button>
</div>

<div class="index-about">
    <i> 好记性不如烂键盘呐 </i>
</div>

<div class="index-container">
    
    <div class="index-left">
        
<div class="nav" id="nav">
    <div class="avatar-name">
        <div class="avatar ">
            <img src="/img/avatar.jpg" />
        </div>
        <div class="name">
            <i>Zhihong Li</i>
        </div>
    </div>
    <div class="contents" id="nav-content">
        <ul>
            <li >
                <a href="/">
                    <i class="iconfont icon-shouye1"></i>
                    <span>主页</span>
                </a>
            </li>
            <li >
                <a href="/tags">
                    <i class="iconfont icon-biaoqian1"></i>
                    <span>标签</span>
                </a>
            </li>
            <li >
                <a href="/archive">
                    <i class="iconfont icon-guidang2"></i>
                    <span>存档</span>
                </a>
            </li>
            <li >
                <a href="/about/">
                    <i class="iconfont icon-guanyu2"></i>
                    <span>关于</span>
                </a>
            </li>
            
            <li>
                <a id="search">
                    <i class="iconfont icon-sousuo1"></i>
                    <span>搜索</span>
                </a>
            </li>
            
        </ul>
    </div>
    
        <div id="toc" class="toc-article">
    <ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%B3%A8%E6%84%8F"><span class="toc-text">注意</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%94%B9%E4%B8%BA%E5%9B%BD%E5%86%85%E6%BA%90"><span class="toc-text">改为国内源</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%9B%B4%E6%96%B0"><span class="toc-text">更新</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%B7%BB%E5%8A%A0%E6%BA%90"><span class="toc-text">添加源</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%9B%B4%E6%8D%A2%E4%B8%AD%E6%96%87%E5%AD%97%E4%BD%93-simsun-ttc%E6%88%96MSYH-TTF"><span class="toc-text">更换中文字体(simsun.ttc或MSYH.TTF)</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%BF%AE%E6%94%B9i3%E9%85%8D%E7%BD%AE"><span class="toc-text">修改i3配置</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Linux%E4%BA%A4%E6%8D%A2Esc%E5%92%8CCaps"><span class="toc-text">Linux交换Esc和Caps</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%BF%AE%E6%94%B9%E9%BB%98%E8%AE%A4%E6%B5%8F%E8%A7%88%E5%99%A8%E4%B8%BAfirefox-%E4%B9%9F%E5%8F%AF%E9%80%89chromium"><span class="toc-text">修改默认浏览器为firefox(也可选chromium)</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%85%B3%E9%97%AD%E6%A1%8C%E9%9D%A2%E5%B7%A6%E4%B8%8B%E8%84%9A%E6%8F%90%E7%A4%BA"><span class="toc-text">关闭桌面左下脚提示</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%AE%89%E8%A3%85%E4%B8%AD%E6%96%87%E8%BE%93%E5%85%A5%E6%B3%95-sunpinyin%E6%88%96libpinyin"><span class="toc-text">安装中文输入法(sunpinyin或libpinyin)</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%AE%89%E8%A3%85%E9%85%8D%E7%BD%AEvim-neovim"><span class="toc-text">安装配置vim&#x2F;neovim</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%BF%AE%E6%94%B9%E7%B3%BB%E7%BB%9F%E6%97%B6%E9%97%B4"><span class="toc-text">修改系统时间</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E8%A7%A3%E5%86%B3%E6%A1%8C%E9%9D%A2%E5%8F%B3%E4%B8%8A%E8%A7%92%E7%9A%84%E6%97%A5%E6%9C%9F%E6%98%BE%E7%A4%BA%E6%96%B9%E5%9D%97%E4%B9%B1%E7%A0%81"><span class="toc-text">解决桌面右上角的日期显示方块乱码</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%88%A0%E9%99%A4%E7%8A%B6%E6%80%81%E6%A0%8F%E7%9A%84%E2%80%9Dno-battery%E2%80%9D"><span class="toc-text">删除状态栏的”no battery”</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#i3status-conf-%E4%BF%AE%E6%94%B9%E7%8A%B6%E6%80%81%E6%A0%8F%E7%9A%84%E6%97%B6%E9%97%B4%E6%97%A5%E6%9C%9F%E6%A0%BC%E5%BC%8F"><span class="toc-text">~&#x2F;.i3status.conf 修改状态栏的时间日期格式</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%AE%89%E8%A3%85%E5%B8%B8%E7%94%A8%E8%BD%AF%E4%BB%B6"><span class="toc-text">安装常用软件</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%88%A0%E9%99%A4%E4%B8%8D%E5%BF%85%E8%A6%81%E7%9A%84%E8%BD%AF%E4%BB%B6"><span class="toc-text">删除不必要的软件</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%AE%89%E8%A3%85ohmyzsh"><span class="toc-text">安装ohmyzsh</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E9%80%89%E8%A3%85"><span class="toc-text">选装</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%BF%AE%E6%94%B9%E8%A7%A6%E6%91%B8%E6%9D%BF%E4%B8%8A%E4%B8%8B%E6%BB%9A%E5%8A%A8"><span class="toc-text">修改触摸板上下滚动</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E8%8B%A5esc%E5%92%8Ccpas%E6%B2%A1%E6%9C%89%E5%88%87%E6%8D%A2%EF%BC%8C%E5%88%99%E5%9C%A8-i3-config%E6%96%B0%E5%A2%9E3%E8%A1%8C"><span class="toc-text">若esc和cpas没有切换，则在.i3&#x2F;config新增3行</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%BC%80%E5%90%AFssh%E6%9C%8D%E5%8A%A1"><span class="toc-text">开启ssh服务</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%AE%89%E8%A3%85%E5%BD%95%E5%B1%8F%E5%B7%A5%E5%85%B7"><span class="toc-text">安装录屏工具</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%AE%89%E8%A3%85VSCode"><span class="toc-text">安装VSCode</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%AE%89%E8%A3%85mqtt-fx"><span class="toc-text">安装mqtt.fx</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%85%8D%E7%BD%AEmail"><span class="toc-text">配置mail</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#WPS-Office"><span class="toc-text">WPS-Office</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#ss-libev-amp-v2ray-plugin"><span class="toc-text">ss-libev&amp;v2ray-plugin</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#WeChat"><span class="toc-text">WeChat</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#python"><span class="toc-text">python</span></a></li></ol>
</div>
    
</div>


<div class="search-field" id="search-field">
    <div class="search-container">
        <div class="search-input">
            <span id="esc-search"> <i class="icon-fanhui iconfont"></i></span>
            <input id="search-input"/>
            <span id="begin-search">搜索</span>
        </div>
        <div class="search-result-container" id="search-result-container">

        </div>
    </div>
</div>

        <div class="index-about-mobile">
            <i> 好记性不如烂键盘呐 </i>
        </div>
    </div>
    
    <div class="index-middle">
        <!-- Main Content -->
        


<div class="post-container">
    <div class="post-title">
        manjaro安装后需要做的事情
    </div>

    <div class="post-meta">
        <span class="attr">发布于：<span>2020-04-27 15:32:41</span></span>
        
        <span class="attr">标签：/
        
        <a class="tag" href="/tags/#manjaro" title="manjaro">manjaro</a>
        <span>/</span>
        
        <a class="tag" href="/tags/#linux" title="linux">linux</a>
        <span>/</span>
        
        
        </span>
        <span class="attr">访问：<span id="busuanzi_value_page_pv"></span>
</span>
</span>
    </div>
    <div class="post-content no-indent">
        <h2 id="注意"><a href="#注意" class="headerlink" title="注意"></a>注意</h2><p>安装系统时选:上海，系统、编码 两个都选 zh-CN.UTF-8 免得后面系统全是英文</p>
<h2 id="改为国内源"><a href="#改为国内源" class="headerlink" title="改为国内源"></a>改为国内源</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman-mirrors -i -c China -m rank</span><br></pre></td></tr></table></figure>
<h2 id="更新"><a href="#更新" class="headerlink" title="更新"></a>更新</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -Syyu</span><br></pre></td></tr></table></figure>
<h2 id="添加源"><a href="#添加源" class="headerlink" title="添加源"></a>添加源</h2><p>在 /etc/pacman.conf 追加</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">[archlinuxcn]</span><br><span class="line">SigLevel = Optional TrustedOnly</span><br><span class="line">Server = http://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/<span class="variable">$arch</span></span><br></pre></td></tr></table></figure>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -Syyu</span><br><span class="line">sudo pacman -S archlinuxcn-keyring</span><br></pre></td></tr></table></figure>
<h2 id="更换中文字体-simsun-ttc或MSYH-TTF"><a href="#更换中文字体-simsun-ttc或MSYH-TTF" class="headerlink" title="更换中文字体(simsun.ttc或MSYH.TTF)"></a>更换中文字体(simsun.ttc或MSYH.TTF)</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -S wqy-microhei</span><br><span class="line"><span class="built_in">cd</span> $(当前仓库)</span><br><span class="line">sudo cp -r ./<span class="built_in">source</span>/_posts/manjaro安装后需要做的事情/fonts/zhfonts /usr/share/fonts</span><br><span class="line"><span class="built_in">cd</span> /usr/share/fonts/zhfonts</span><br><span class="line">sudo mkfontscale</span><br><span class="line">sudo mkfontdir</span><br><span class="line">sudo fc-cache -fv</span><br></pre></td></tr></table></figure>
<h2 id="修改i3配置"><a href="#修改i3配置" class="headerlink" title="修改i3配置"></a>修改i3配置</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> $(当前仓库)</span><br><span class="line">mv ~/.i3/config ~/.i3/config.bak</span><br><span class="line">ln -s $(<span class="built_in">pwd</span>)/<span class="built_in">source</span>/_posts/manjaro安装后需要做的事情/i3/config ~/.i3/config</span><br></pre></td></tr></table></figure>
<h2 id="Linux交换Esc和Caps"><a href="#Linux交换Esc和Caps" class="headerlink" title="Linux交换Esc和Caps"></a><a target="_blank" rel="noopener" href="https://superuser.com/questions/566871/how-to-map-the-caps-lock-key-to-escape-key-in-arch-linux/568573">Linux交换Esc和Caps</a></h2><p>在文件 ~/.i3/config 加入</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">exec_always --no-startup-id setxkbmap -option caps:swapescape &amp;</span><br></pre></td></tr></table></figure>
<h2 id="修改默认浏览器为firefox-也可选chromium"><a href="#修改默认浏览器为firefox-也可选chromium" class="headerlink" title="修改默认浏览器为firefox(也可选chromium)"></a>修改默认浏览器为firefox(也可选chromium)</h2><ol>
<li>安装firefox<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -S firefox-i18n-zh-cn</span><br></pre></td></tr></table></figure></li>
<li>修改~/.i3/config对应行<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">bindsym <span class="variable">$mod</span>+F2 <span class="built_in">exec</span> firefox</span><br></pre></td></tr></table></figure></li>
<li>修改~/.config/mimeapps.list<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">vim ~/.config/mimeapps.list</span><br><span class="line">:%s/userapp-Pale Moon/firefox/g</span><br></pre></td></tr></table></figure></li>
<li>修改~/.profile<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">export</span> BROWSER=/usr/bin/firefox</span><br></pre></td></tr></table></figure></li>
<li>卸载palemoon<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -Rns <span class="built_in">local</span>/palemoon-bin</span><br></pre></td></tr></table></figure></li>
<li>重新加载配置或重启</li>
</ol>
<h2 id="关闭桌面左下脚提示"><a href="#关闭桌面左下脚提示" class="headerlink" title="关闭桌面左下脚提示"></a>关闭桌面左下脚提示</h2><p>注释掉<code>/usr/bin/start_conky_maia</code>里的<code># conky -c /usr/share/conky/conky1.10_shortcuts_maia &amp;&amp;</code></p>
<h2 id="安装中文输入法-sunpinyin或libpinyin"><a href="#安装中文输入法-sunpinyin或libpinyin" class="headerlink" title="安装中文输入法(sunpinyin或libpinyin)"></a>安装中文输入法(sunpinyin或libpinyin)</h2><ol>
<li>安装输入法以及依赖<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -S fcitx fcitx-im fcitx-configtool fcitx-ui-light ttf-dejavu adobe-source-han-sans-otc-fonts fcitx-libpinyin fcitx-sunpinyin fcitx-cloudpinyin</span><br></pre></td></tr></table></figure></li>
<li>给文件 ~/.xprofile 追加<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">export</span> GTK_IM_MODULE=fcitx</span><br><span class="line"><span class="built_in">export</span> QT_IM_MODULE=fcitx</span><br><span class="line"><span class="built_in">export</span> XMODIFIERS=<span class="string">&quot;@im=fcitx&quot;</span></span><br></pre></td></tr></table></figure></li>
<li>给文件 ~/.profile 追加<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">fcitx</span><br></pre></td></tr></table></figure>
<h2 id="安装配置vim-neovim"><a href="#安装配置vim-neovim" class="headerlink" title="安装配置vim/neovim"></a>安装配置<a target="_blank" rel="noopener" href="https://github.com/humble-zh/myvim.git">vim/neovim</a></h2></li>
</ol>
<p>在 ~/.profile 修改默认编辑器为vim</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">export</span> EDITOR=/usr/bin/vim</span><br></pre></td></tr></table></figure>

<h2 id="修改系统时间"><a href="#修改系统时间" class="headerlink" title="修改系统时间"></a>修改系统时间</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -S ntp</span><br><span class="line">sudo timedatectl set-ntp <span class="literal">true</span></span><br></pre></td></tr></table></figure>
<h2 id="解决桌面右上角的日期显示方块乱码"><a href="#解决桌面右上角的日期显示方块乱码" class="headerlink" title="解决桌面右上角的日期显示方块乱码"></a>解决桌面右上角的日期显示方块乱码</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">sudo cp /usr/share/conky/conky_maia /usr/share/conky/conky_maia.bak</span><br><span class="line">sudo vim /usr/share/conky/conky_maia</span><br><span class="line">:%s/Bitstream Vera/anti/g</span><br></pre></td></tr></table></figure>
<h2 id="删除状态栏的”no-battery”"><a href="#删除状态栏的”no-battery”" class="headerlink" title="删除状态栏的”no battery”"></a>删除状态栏的”no battery”</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> $(当前仓库)</span><br><span class="line">ln -s $(<span class="built_in">pwd</span>)/<span class="built_in">source</span>/_posts/manjaro安装后需要做的事情/i3status.conf ~/.i3status.conf</span><br></pre></td></tr></table></figure>
<p>拷贝 /etc/i3status.conf 到 ~/.i3status.conf ，注释 ~/.i3status.conf 以下行</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">order += <span class="string">&quot;battery all&quot;</span></span><br></pre></td></tr></table></figure>
<h2 id="i3status-conf-修改状态栏的时间日期格式"><a href="#i3status-conf-修改状态栏的时间日期格式" class="headerlink" title="~/.i3status.conf 修改状态栏的时间日期格式"></a>~/.i3status.conf 修改状态栏的时间日期格式</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">tztime <span class="built_in">local</span> &#123;</span><br><span class="line">        format = <span class="string">&quot;%Y-%m-%d %H:%M:%S&quot;</span></span><br><span class="line">        <span class="comment"># format = &quot; %d.%m. %H:%M &quot;</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h2 id="安装常用软件"><a href="#安装常用软件" class="headerlink" title="安装常用软件"></a>安装常用软件</h2><p><a target="_blank" rel="noopener" href="https://wiki.archlinux.org/index.php/Taking_a_screenshot_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)">scrot</a>: 截图软件</p>
<p><a href="">variety</a>: 更换壁纸</p>
<p><a target="_blank" rel="noopener" href="https://github.com/albertlauncher/albert">albert</a>: 快捷搜索/执行</p>
<p><a target="_blank" rel="noopener" href="https://github.com/ggreer/the_silver_searcher">the_silver_searcher</a>: 快速的代码命令行搜索工具 ag</p>
<p><a target="_blank" rel="noopener" href="https://github.com/wting/autojump">autojump</a>: 快速跳转目录</p>
<p><a target="_blank" rel="noopener" href="https://wiki.archlinux.org/index.php/Fzf">fzf</a>: 终端命令行模糊查询历史</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -S sshpass mosquitto scrot albert the_silver_searcher fzf base-devel cmake unrar unzip yay</span><br><span class="line"></span><br><span class="line"><span class="comment">#echo &#x27;. /usr/share/autojump/autojump.bash&#x27; &gt;&gt; ~/.bashrc</span></span><br><span class="line"><span class="built_in">echo</span> <span class="string">&#x27;. /usr/share/fzf/key-bindings.bash&#x27;</span> &gt;&gt; ~/.bashrc</span><br><span class="line"><span class="built_in">echo</span> <span class="string">&#x27;. /usr/share/fzf/completion.bash&#x27;</span> &gt;&gt; ~/.bashrc</span><br><span class="line"><span class="built_in">source</span> ~/.bashrc</span><br></pre></td></tr></table></figure>
<h2 id="删除不必要的软件"><a href="#删除不必要的软件" class="headerlink" title="删除不必要的软件"></a>删除不必要的软件</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -Rns $(pacman -Qdtq)</span><br></pre></td></tr></table></figure>
<h2 id="安装ohmyzsh"><a href="#安装ohmyzsh" class="headerlink" title="安装ohmyzsh"></a>安装<a target="_blank" rel="noopener" href="https://github.com/ohmyzsh/ohmyzsh/#manual-inspection">ohmyzsh</a></h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sh -c <span class="string">&quot;<span class="subst">$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)</span>&quot;</span></span><br></pre></td></tr></table></figure>
<p>或</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sh -c <span class="string">&quot;<span class="subst">$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)</span>&quot;</span></span><br></pre></td></tr></table></figure>
<p>或</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">curl -Lo install.sh https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh</span><br><span class="line">sh install.sh</span><br></pre></td></tr></table></figure>
<p>如果出现 <code>Failed to connect to raw.githubusercontent.com port 443: Connection refused</code> ,就在/etc/hosts文件追加</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">199.232.28.133 raw.githubusercontent.com</span><br></pre></td></tr></table></figure>
<p>修改ohmyzsh配置</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> $(当前仓库)</span><br><span class="line">mv ~/.zshrc ~/.zshrc.bak</span><br><span class="line">ln -s $(<span class="built_in">pwd</span>)/<span class="built_in">source</span>/_posts/manjaro安装后需要做的事情/zshrc ~/.zshrc</span><br></pre></td></tr></table></figure>
<p>安装ohmyzsh两个插件<a target="_blank" rel="noopener" href="https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/INSTALL.md#oh-my-zsh">zsh-syntax-highlighting</a>，<a target="_blank" rel="noopener" href="https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md#oh-my-zsh">zsh-autosuggestions</a></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">git <span class="built_in">clone</span> https://github.com/zsh-users/zsh-syntax-highlighting.git <span class="variable">$&#123;ZSH_CUSTOM:-~/.oh-my-zsh/custom&#125;</span>/plugins/zsh-syntax-highlighting</span><br><span class="line">git <span class="built_in">clone</span> https://github.com/zsh-users/zsh-autosuggestions <span class="variable">$&#123;ZSH_CUSTOM:-~/.oh-my-zsh/custom&#125;</span>/plugins/zsh-autosuggestions</span><br></pre></td></tr></table></figure>
<p>查看<code>git</code>命令缩写</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">cat ~/.oh-my-zsh/plugins/git/git.plugin.zsh</span><br></pre></td></tr></table></figure>
<p><code>git status</code>中文乱码</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git config --global core.quotepath <span class="literal">false</span></span><br></pre></td></tr></table></figure>
<h2 id="选装"><a href="#选装" class="headerlink" title="选装"></a>选装</h2><h3 id="修改触摸板上下滚动"><a href="#修改触摸板上下滚动" class="headerlink" title="修改触摸板上下滚动"></a>修改触摸板上下滚动</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo cp /etc/X11/xorg.conf.d/30-touchpad.conf /etc/X11/xorg.conf.d/30-touchpad.conf.bak</span><br></pre></td></tr></table></figure>
<h3 id="若esc和cpas没有切换，则在-i3-config新增3行"><a href="#若esc和cpas没有切换，则在-i3-config新增3行" class="headerlink" title="若esc和cpas没有切换，则在.i3/config新增3行"></a>若esc和cpas没有切换，则在<code>.i3/config</code>新增3行</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">exec_always --no-startup-id xmodmap -e <span class="string">&quot;clear lock&quot;</span></span><br><span class="line">exec_always --no-startup-id xmodmap -e <span class="string">&quot;keycode 9 = Caps_Lock NoSymbol Caps_Lock&quot;</span></span><br><span class="line">exec_always --no-startup-id xmodmap -e <span class="string">&quot;keycode 66 = Escape NoSymbol Escape&quot;</span></span><br></pre></td></tr></table></figure>
<figure class="highlight patch"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">--- /etc/X11/xorg.conf.d/30-touchpad.conf.bak	2021-01-24 22:23:49.541749394 +0800</span></span><br><span class="line"><span class="comment">+++ /etc/X11/xorg.conf.d/30-touchpad.conf	2021-01-24 22:21:09.836616261 +0800</span></span><br><span class="line"><span class="meta">@@ -3,4 +3,6 @@</span></span><br><span class="line">     Driver &quot;libinput&quot;</span><br><span class="line">     MatchIsTouchpad &quot;on&quot;</span><br><span class="line">     Option &quot;Tapping&quot; &quot;on&quot;</span><br><span class="line"><span class="addition">+    Option &quot;NaturalScrolling&quot; &quot;true&quot;</span></span><br><span class="line"><span class="addition">+    Option &quot;ClickMethod&quot; &quot;clickfinger&quot; #(去掉,因为右键会失效)</span></span><br><span class="line"> EndSection</span><br></pre></td></tr></table></figure>

<h3 id="开启ssh服务"><a href="#开启ssh服务" class="headerlink" title="开启ssh服务"></a>开启ssh服务</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">sudo systemctl <span class="built_in">enable</span> sshd.service <span class="comment">#开机启动</span></span><br><span class="line">sudo systemctl start sshd.service <span class="comment">#立即启动</span></span><br><span class="line">sudo systemctl restart sshd.service <span class="comment">#立即重启</span></span><br></pre></td></tr></table></figure>
<h3 id="安装录屏工具"><a href="#安装录屏工具" class="headerlink" title="安装录屏工具"></a>安装录屏工具</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -S obs-studio</span><br></pre></td></tr></table></figure>
<h3 id="安装VSCode"><a href="#安装VSCode" class="headerlink" title="安装VSCode"></a>安装VSCode</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -S visual-studio-code-bin</span><br></pre></td></tr></table></figure>
<p>VSCode安装vim插件后，esc和caps没切换，在设置里搜<code>Keyboard:Dispatch</code>改为<code>keyCode</code>重启软件即可</p>
<h3 id="安装mqtt-fx"><a href="#安装mqtt-fx" class="headerlink" title="安装mqtt.fx"></a>安装mqtt.fx</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">yay -S mqttfx-bin</span><br></pre></td></tr></table></figure>
<h3 id="配置mail"><a href="#配置mail" class="headerlink" title="配置mail"></a>配置mail</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -S mailx</span><br></pre></td></tr></table></figure>
<p>修改 /etc/mail.rc 权限并追加内容</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">set</span> from=humble.li@evpowergroup.com smtp=<span class="string">&quot;smtp.mxhichina.com&quot;</span></span><br><span class="line"><span class="built_in">set</span> smtp-auth-user=<span class="string">&quot;humble.li@evpowergroup.com&quot;</span> smtp-auth-password=<span class="string">&quot;123456&quot;</span></span><br><span class="line"><span class="built_in">set</span> smtp-auth=login</span><br></pre></td></tr></table></figure>
<h3 id="WPS-Office"><a href="#WPS-Office" class="headerlink" title="WPS-Office"></a>WPS-Office</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -S wps-office ttf-wps-fonts</span><br></pre></td></tr></table></figure>
<h3 id="ss-libev-amp-v2ray-plugin"><a href="#ss-libev-amp-v2ray-plugin" class="headerlink" title="ss-libev&amp;v2ray-plugin"></a>ss-libev&amp;v2ray-plugin</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -S shadowsocks-libev shadowsocks-v2ray-plugin proxychains</span><br><span class="line">v2ray-plugin --<span class="built_in">help</span></span><br><span class="line">nohup ss-local -c ~/v2ray.conf &amp;</span><br><span class="line">``</span><br><span class="line"></span><br><span class="line">把`/etc/proxychains.conf`的`socks4*`改为`socks5 127.0.0.1 1080`</span><br><span class="line"></span><br><span class="line">浏览器：手动代理配置:127.0.0.1,端口:1080,使用SOCKSv5时代理DNS查询</span><br><span class="line"></span><br><span class="line"><span class="comment">### [deepin TIM/QQ](https://hacpai.com/article/1552717494529)</span></span><br><span class="line">前提：添加 archlinuxcn 源。在 /etc/pacman.conf 里加入以下代码：</span><br><span class="line"></span><br><span class="line">```bash</span><br><span class="line">[archlinuxcn]</span><br><span class="line">SigLevel = Never</span><br><span class="line">Server = http://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/<span class="variable">$arch</span></span><br></pre></td></tr></table></figure>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -Sy</span><br></pre></td></tr></table></figure>
<p>安装 TIM</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -S deepin.com.qq.office</span><br><span class="line">nohup /opt/deepinwine/apps/Deepin-WeChat/run.sh &gt; /dev/null 2&gt;&amp;1 &amp;</span><br></pre></td></tr></table></figure>
<p>无法启动</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">X Error of failed request: BadWindow (invalid Window parameter)</span><br><span class="line">Major opcode of failed request: 20 (X_GetProperty)</span><br><span class="line">Resource id <span class="keyword">in</span> failed request:</span><br><span class="line">0x0 Serial number of failed request:</span><br><span class="line">10 Current serial number <span class="keyword">in</span> output stream: 10</span><br></pre></td></tr></table></figure>
<p>解决方案</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">yaourt -S gnome-settings-daemon</span><br><span class="line">nohup /usr/lib/gsd-xsettings &gt; /dev/null 2&gt;&amp;1 &amp;</span><br><span class="line">nohup /opt/deepinwine/apps/Deepin-WeChat/run.sh &gt; /dev/null 2&gt;&amp;1 &amp;</span><br></pre></td></tr></table></figure>
<p>开机启动 /usr/lib/gsd-xsettings ,往 ~/.i3/config 加入</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">exec_always --no-startup-id nohup /usr/lib/gsd-xsettings &gt; /dev/null 2&gt;&amp;1 &amp;</span><br></pre></td></tr></table></figure>
<p>系统语言非中文时，中文全显示成方块，需要在 /opt/deepinwine/tools/run.sh 中将 WINE_CMD 那一行修改为</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">WINE_CMD=<span class="string">&quot;LC_ALL=zh_CN.UTF-8 deepin-wine&quot;</span></span><br></pre></td></tr></table></figure>
<h3 id="WeChat"><a href="#WeChat" class="headerlink" title="WeChat"></a><a target="_blank" rel="noopener" href="https://github.com/countstarlight/deepin-wine-wechat-arch">WeChat</a></h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">yay -S deepin-wine-wechat</span><br><span class="line">/opt/deepinwine/apps/Deepin-WeChat/run.sh</span><br></pre></td></tr></table></figure>
<h2 id="python"><a href="#python" class="headerlink" title="python"></a>python</h2><p><a target="_blank" rel="noopener" href="https://github.com/joh/when-changed">when-changed</a>: 监控文件变动并且执行命令</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">pip3 install when-changed</span><br></pre></td></tr></table></figure>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">pip3 install ipdb</span><br></pre></td></tr></table></figure>
        
        <br />
        <div id="comment-container">
        </div>
        <div id="disqus_thread"></div>

        <div id="lv-container">
        </div>

    </div>
</div>

    </div>
</div>


<footer class="footer">
    <ul class="list-inline text-center">
        
        

        

        

        

        

    </ul>
    
    <p>
        <span id="busuanzi_container_site_pv">
            <span id="busuanzi_value_site_pv"></span>PV
        </span>
        <span id="busuanzi_container_site_uv">
            <span id="busuanzi_value_site_uv"></span>UV
        </span>
        Created By <a target="_blank" rel="noopener" href="https://hexo.io/">Hexo</a>  Theme <a target="_blank" rel="noopener" href="https://github.com/aircloud/hexo-theme-aircloud">AirCloud</a></p>
</footer>




</body>

<script>
    // We expose some of the variables needed by the front end
    window.hexo_search_path = "search.json"
    window.hexo_root = "/"
    window.isPost = true
</script>
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>

<script src="/js/index.js"></script>

<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>




</html>
